import React, { Component } from 'react'
import Gun from "./Guarantee/Gun" 
import {Link} from "react-router-dom"
import A from "./Guarantee/Lodding.module.css"
import img1 from "./Guarantee/image/icc_03.png"
import img2 from "./Guarantee/image/icc_05.png"
import img3 from "./Guarantee/image/icc_07.png"
import axios from "axios"
import Item from 'antd/lib/list/Item'

export default class guarantee extends Component {
  
  constructor(props){
    super(props)
    this.state={
        res:'',
       
    }
  }
  componentDidMount(){
    axios.get("/api/guarantee/getmoney").then(res=>{
      // console.log(res,"shuzi");
      
      console.log(this.state.res,"xuanran");
      this.setState({
        res:res.data
      })
    })
  }
    // axios.get("http://h2a36v.natappfree.cc/guarantee/getall?page=1&pagesize=5").then(res=>{
    //   console.log(res);
    //   this.state.sop=res.data
    //   // console.log(this.state.res,"hahadfha");
    //   this.setState({})
    // })
  
  
  render() {
    return (
      <div className={A.danbao}>
        {/* {担保销售页} */}
        <article className={A.first}>
            
              <div className={A.top}>
                  <div className={A.div1}>
                    <div className={A.span1}>
                      <span className={A.nice}>nice</span>
                      <b>担保预售</b>
                    </div>
                    <i className={A.span2}>每天20:00 开抢 买到就是赚到</i>
                  </div>
                  
                  <div className={A.rule}>
                      <Link to="./rule" style={{color:"#111"}}>规则</Link>
                  </div>  
              </div>


              <nav className={A.nav}>
                <div className={A.left}>
                
                  <b style={{width:"80px",height:"30px"}}>
                    {this.state.res}元
                  </b>
                  <span className={A.lei}>累计为买家节省</span>
                </div>
                <div className={A.right}>
                  <div className={A.a1}>
                      <img src={img1}/>
                      <span className={A.haha1}>低价货源</span>
                  </div>
                  <div className={A.a2}>
                      <img src={img2}/>

                      <span className={A.haha2}>平台担保</span>
                  </div>
                  <div className={A.a3}>
                      <img src={img3}/>
                      <span className={A.haha3}>支持代卖</span>
                  </div>
                </div> 
              </nav> 
        </article>
        
        <div className={A.content} style={{background:"#ffffff"}}>
            <Gun></Gun>
        </div>
      </div>  
    )
  }

 }

        










